Dear Stata users,
I am using Stata 17 and would like to simulate a lognormal distribution with parameters as shown below

where E(Y) is average income and G the Gini coefficient of a specific country
The code am using is
Robust analysis as per the last two commands show that the resulting distribution has biased estimates. My guess is the issue may be arising from how I am generating the inverse standard normal variate.
Any advice would be appreciated.
Thanks in advance
I am using Stata 17 and would like to simulate a lognormal distribution with parameters as shown below
where E(Y) is average income and G the Gini coefficient of a specific country
The code am using is
Code:
local meani = 9791.288442 local gini = 0.59203426 set seed 158961 clear set obs 18802 gen sigma = sqrt(2)*(1/normal(1))*((`gini' + 1)/2) gen mu = log(`meani') - (sigma^2)/2 gen lognormal_inc = exp(rnormal(mu, sigma)) mean lognormal_inc fastgini lognormal_inc
Any advice would be appreciated.
Thanks in advance
Comment